'''
Created on Mar 17, 2012

@author: phuongdongbk
'''

import math

# deal with Square
"""calculate Square's area"""
def squareArea(h):
    return "%0.4f" %(h*h)
"""calculate Square's perimeter"""
def squarePeri(h):
    return "%0.4f" %(h*4)

# deal with Rectangle
"""calculate Rectangle's area"""
def rectangleArea(h, w):
    return "%0.4f" %(h*w)
"""calculate Rectangle's perimeter"""
def rectanglePeri(h,w):
    return "%0.4f" %((h+w)*2)

# deal with Circle
"""calculate Circle's area"""
def circleArea(r):
    return "%0.4f" %(math.pi * r * r)
"""calculate Circle's perimeter"""
def circlePeri(r):
    return "%0.4f" %(math.pi * 2 * r)
